const fs = require('fs')

module.exports.getFileJsonData = (url) => {
  return new Promise((resolve, reject) => {
    fs.readFile(url, 'utf-8', (error, data) => {
      if(error) {
        reject(error.message)
      }
      resolve(data)
    })
  })
}